<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>vaeThink</title>
    {include file="../common/header"}
</head>
<body class="vae-body">

<div class="vae-content">
    <form class="layui-form layui-form-pane" style="display: inline;">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">选择任务</label>
                <div class="layui-input-inline">
                    <select name="tid"  required lay-verify="required">
                        <option value="">请选择任务</option>
                        {volist name="taskList" id="vo"}
                        <option value="{$vo.id}">{$vo.number}:{$vo.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">日期范围</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="test6"   name="datetime" placeholder=" - ">
                </div>
            </div>
        </div>
        <div class="layui-form-item" pane="">
            <label class="layui-form-label">排序分类</label>
            <div class="layui-input-block">
                <input type="radio" name="orderType" value="0" class="rel" title="无">
                <input type="radio" name="orderType" value="1" class="rel" title="意向分" checked>
                <input type="radio" name="orderType" value="2" class="rel" title="通话评分">
            </div>
        </div>
        <div class="layui-form-item" pane="">
            <label class="layui-form-label">排序方式</label>
            <div class="layui-input-block">
                <input type="radio" name="order" value="1" class="rel" title="升序" checked>
                <input type="radio" name="order" value="2"  class="rel" title="降序">
            </div>
        </div>

        <button class="layui-btn layui-btn-sm layui-btn-danger" lay-submit="" lay-filter="vaeform">提交搜索</button>
    </form>
    <table class="layui-hide" id="list" lay-filter="test">


    </table>
</div>






{include file="../common/footer"}
<script type="text/html" id="toolbarDemo"></script>

<script>


    layui.config({
        base: '/themes/admin_themes/module/'
    }).use(['table','vaeyo','form'], function(){
        var table = layui.table
            ,vae = layui.vaeyo
            ,$ = layui.$
            ,form = layui.form;

        var tableIns = table.render({
            elem: '#list'
            ,toolbar: '#toolbarDemo'
            ,url: "{:url('taskStat/ajaxLogList')}" //数据接口
            ,cols: [[ //表头
                {field: 'nickname', title: '客服',  fixed: 'left', align:'center', width:80}
                ,{field: 'username', title: '客户', fixed: 'left', align:'center', width:80}
                ,{field: 'aim', title: '任务目的', fixed: 'left', align:'center', width:80}
                ,{field: 'sex', title: '性别', align:'center'}
                ,{field: 'age', title: '生日', align:'center'}
                ,{field: 'phone', title:'手机号',  align:'center'}
                ,{field: 'qq', title:'QQ',  align:'center'}
                ,{field: 'wechat', title:'微信',  align:'center'}
                ,{field: 'alipay', title:'支付宝账号',  align:'center'}
                ,{field: 'email', title:'邮箱',  align:'center'}
                ,{field: 'call_status', title:'拨打状态',  align:'center'}
                ,{field: 'intention', title:'意向分',  align:'center'}
                ,{field: 'mark', title:'本次通话拼分',  align:'center'}
                ,{field: 'remark', title:'备注',  align:'center'}
                ,{field: 'create_time', title:'拨打时间',  align:'center'}
            ]]
        });

        //监听搜索提交
        form.on('submit(vaeform)', function(data){
            if(data.field) {
                tableIns.reload({where:{keywords:data.field}});
                vae.bundledTab();
            }
            return false;
        });
    });
</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //日期范围
        laydate.render({
            elem: '#test6'
            ,min: -7
            ,max: 0
            ,range: true
        });

    });
</script>
</body>
</html>